#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

char* ts ;

int main(int i, char* args[]) {

	ts = (char*) malloc(sizeof(char) * 32);
	while (1) {
		memset(ts, 0, 32);
		int gs = read(0, ts, 32);
		if (gs > 0) {
			strncpy(ts,ts,gs-2);
			printf("\n%s---%d\n\n", ts,gs);
		}
	}

	return 0;
}
